package com.etime.shycourse.controller.wx.courselist;

import com.etime.shycourse.dto.WXOffLineCourseDetailDto;
import com.etime.shycourse.services.wxcourselist.WXOffLineCouresService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 线下课程相关数据接口
 */
@Api(tags = "微信-线下课程相关数据接口")
@RestController
@RequestMapping("/wx/offline")
public class WXOffLineCouresController {

    @Autowired
    private WXOffLineCouresService wxOffLineCouresService;

    /**
     * 小程序端查询线下课程详情信息。
     * @param courseid 课程id
     * @return 包含：课程详情；章节列表，课时列表
     */
    @ApiOperation("小程序端查询线下课程详细信息数据接口")
    @GetMapping("/detail/{courseid}")
    public WXOffLineCourseDetailDto selectOffLineCourseDetail(@PathVariable("courseid") Integer courseid){
        return wxOffLineCouresService.selectOffLineCourseDetail(courseid);
    }

}
